<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

	protected function _initConfig()
	{
		session_start();
		
		$config = new Zend_Config($this->getOptions(), true);
		Zend_Registry::set('app_config', $config);
		return $config;
	}

	protected function _initCustomConfig()
	{
		$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/config.ini');
		Zend_Registry::set('config', $config);

		return $config;
	}


	protected function _initView() {
		// Initialisation de la vue et des helpers de vue
		$view = new Zend_View();
		$view->doctype ( 'XHTML1_STRICT' );

		// On charge l'helper qui va se charger de la vue
		$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper ( 'ViewRenderer' );
		$viewRenderer->setView ( $view );

		return $view;
	}



	protected function _initRouter() {
		$front = $this->bootstrap('FrontController')->getResource('FrontController');
		$router = $front->getRouter();
		
// 		//INDEX CONTROLLER
// 		$route = new Zend_Controller_Router_Route('home', array('controller' => 'index', 'action' => 'index'));
// 		$router->addRoute('home', $route);
				
// 		//ADMIN CONTROLLER
// 		$route = new Zend_Controller_Router_Route('admin', array('controller' => 'admin', 'action' => 'index'));
// 		$router->addRoute('admin', $route);
		
// 		//MONTAGE CONTROLLER
// 		$route = new Zend_Controller_Router_Route('montage', array('controller' => 'montage', 'action' => 'get'));
// 		$router->addRoute('admin', $route);
		
// 		//REAL CONTROLLER
// 		$route = new Zend_Controller_Router_Route('real', array('controller' => 'real', 'action' => 'get'));
// 		$router->addRoute('admin', $route);
		
	}
}

